\documentclass{minimal}
\usepackage{subfiles}

\begin{document}

\subfile{sub/sub.tex}

\end{document}
